package com.learn.web;

import javax.servlet.*;
import java.io.IOException;

public class FilterOne implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        Filter.super.init(filterConfig);
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("filter_one name：" + this.getClass().getName());
        filterChain.doFilter(servletRequest, servletResponse);
        // return;
        throw new RuntimeException("测试.");
        // System.out.println("filter_one_after name：" + this.getClass().getName());
    }

    @Override
    public void destroy() {
        Filter.super.destroy();
    }

}
